package com.zyz.rabbitmqopsdemo.config;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {
    // 仲裁队列
    @Bean("quorumQueue")
    public Queue quorumQueue() {
        return QueueBuilder.durable("quorum.queue").quorum().build();
    }

    // 集群
    @Bean("clusterQueue")
    public Queue clusterQueue() {
        return QueueBuilder.durable("cluster.queue").quorum().build();
    }

}
